<template>
	<div class="header">
		<slot name="left"></slot>
		<span class="header-title ellipsis">{{title}}</span>
		<slot name="right"></slot>
	</div>
</template>

<script>
	export default {
		props:{
			title: {
				type: String,
				default: '获取失败'
			}
		}
	}
</script>

<style lang="less" scoped>
	.header{
		position: fixed;
		z-index: 99;
		left: 0;
		top: 0;
		right: 0;
		width: 100%;
		height: 50px;
		background: #03A774;
		display: flex;
		align-items: center;
		justify-content: center;
		color: #fff;
	}
	
	.header-icon{
		flex: 1;
		height: 50px;
		line-height: 50px;
		.iconfont{
			font-size: 20px;
			padding-left: 10px;
		}
	}
	
	.header-title{
		width: 50%;
		font-size: 16px;
		text-align: center;
	}
	
	.header-link{
		flex: 1;
		text-align: right;
		padding-right: 10px;
		
		.link-item{
			color: #fff;
			font-size: 15px;
		}
		.pg{
			margin: 0 5px;
		}
	}
	
</style>
